package com.qf.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.mapper.DtsGoodsMapper;
import com.qf.pojo.DtsGoods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    private DtsGoodsMapper dtsGoodsMapper;

    @Override
    public int countGoods() {
        QueryWrapper<DtsGoods> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("deleted",false);

        Integer count = dtsGoodsMapper.selectCount(queryWrapper);
        return count;
    }
}
